<!DOCTYPE html>
<html>
    <head>
        <script src="vue.js"></script>
    </head>
    <body>
        <div id="app">
            {{msg}}
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data:{
                    msg:'张三'
                },
                beforeCreate(){
                    console.log('实例创建之前');
                    console.log(this.$data);
                    console.log(this.$data.msg);
                },
                created(){
                    console.log('创建实例之后');
                    console.log(this.$data);
                    console.log(this.$data.msg);
                }
            });
        </script>
    </body>
</html>